<?php
class PublicAction extends CommonAction{
    public function index(){
        if(!empty($this->iic_username) && !empty($this->iic_uid)){
        	$this->redirect('main','Index','3','请先登录！');
        }else{
        	$this->redirect('login','','3','请先登录！');
        }
    }
    
    //用户登录
    public function login(){
    	dump($_SESSION);
    	$this->display();
    }
    
    //检查用户登录
    function is_login(){
    	
    }
    
	public function verify()    {
		$type	 =	 isset($_GET['type'])?$_GET['type']:'gif';
        import("@.ORG.Image");
        Image::buildImageVerify(4,1,$type);
    }
    
// 修改资料
	public function change() {
		$this->checkUser();
		$User	 =	 D("User");
		if(!$User->create()) {
			$this->error($User->getError());
		}
		$result	=	$User->save();
		if(false !== $result) {
			$this->success('资料修改成功！');
		}else{
			$this->error('资料修改失败!');
		}
	}
}
?>